package com.team.employment.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.team.employment.model.enums.BaseStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 用户信息表
 * @TableName user_info
 */

@Schema(description = "法定人信息表")
@TableName(value ="user_info")
@Data
public class UserInfo extends BaseEntity{

    private static final long serialVersionUID = 1L;
    /**
     * 手机号
     */
    @Schema(description = "手机号")
    @TableField(value = "phone")
    private String phone;

    /**
     * 密码
     */
    @Schema(description = "密码")
    @TableField(value = "password")
    private String password;

    /**
     * 昵称
     */
    @Schema(description = "昵称")
    @TableField(value = "username")
    private String username;

    /**
     * 用户类型(ADMIN，ENTREPRENEURS，学生)
     */
    @Schema(description = "用户类型")
    @TableField(value = "type")
    private Long type;

    /**
     * 头像url
     */
    @Schema(description = "头像url")
    @TableField(value = "avatar_url")
    private String avatarUrl;

    /**
     * 性别(女，男)
     */
    @Schema(description = "性别")
    @TableField(value = "sex")
    private String sex;

    /**
     * 账号状态(0,1)
     */
    @Schema(description = "账号状态")
    @TableField(value = "status")
    private BaseStatus status;

    /**
     * 用于存储用户登录 token
     */
    @Schema(description = "用户登录 token(不存数据库)")
    @TableField(exist = false)
    private String token;

    @Schema(description = "密码加密盐值（存数据库）")
    @TableField(value = "salt")
    private String salt;

}